class UrlMappings {

	static mappings = {
		"403" (controller: "karmaError", action: "forbidden")
		"401" (controller: "karmaError", action: "forbidden")
		//"404"(controller: "/karmaError", action: "notFound")
		"500"(controller: "/karmaError", action: "internalError")
		
		"/$controller/$action?/$id?"{
			constraints {
				// apply constraints here
			}
		}

		"/documents/$id?"(controller:"document"){
			action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"]
		}

		"/users/$id?"(controller:"user"){
			action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"]
		}
		
		"/addresses/$id?"(controller:"address"){
			action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"]
		}
		
		"/comments/$id?"(controller:"comment"){
			action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"]
		}
		
		"/tags/$id?"(controller:"tag"){
			action = [GET:"show", DELETE:"delete"]
		}
		
		"/votes/$id?"(controller:"vote"){
			action = [GET:"show", PUT:"update", DELETE:"delete", POST:"save"]
		}
		
		"/"(view:"/index")
		"500"(view:'/error')
	}
}
